class BrushHappyModel {
  int code;
  String msg;
  List<BrushData> data;

  BrushHappyModel({this.code, this.msg, this.data});

  BrushHappyModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    msg = json['msg'];
    if (json['data'] != null) {
      data = new List<BrushData>();
      json['data'].forEach((v) {
        data.add(new BrushData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['msg'] = this.msg;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class BrushData {
  int id;
  UserInfo userInfo;
  int postType;
  String postContent;
  String postVideoUrl;
  String postCoverUrl;
  String postGeo;
  String tencentFileId;

  BrushData(
      {this.id,
        this.userInfo,
        this.postType,
        this.postContent,
        this.postVideoUrl,
        this.postCoverUrl,
        this.postGeo,
        this.tencentFileId});

  BrushData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    userInfo = json['userInfo'] != null
        ? new UserInfo.fromJson(json['userInfo'])
        : null;
    postType = json['postType'];
    postContent = json['postContent'];
    postVideoUrl = json['postVideoUrl'];
    postCoverUrl = json['postCoverUrl'];
    postGeo = json['postGeo'];
    tencentFileId = json['tencentFileId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    if (this.userInfo != null) {
      data['userInfo'] = this.userInfo.toJson();
    }
    data['postType'] = this.postType;
    data['postContent'] = this.postContent;
    data['postVideoUrl'] = this.postVideoUrl;
    data['postCoverUrl'] = this.postCoverUrl;
    data['postGeo'] = this.postGeo;
    data['tencentFileId'] = this.tencentFileId;
    return data;
  }
}

class UserInfo {
  int id;
  String nickName;
  int sex;
  String avatarUrl;
  int infoStatu;
  int accountStatu;

  UserInfo(
      {this.id,
        this.nickName,
        this.sex,
        this.avatarUrl,
        this.infoStatu,
        this.accountStatu});

  UserInfo.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    nickName = json['nickName'];
    sex = json['sex'];
    avatarUrl = json['avatarUrl'];
    infoStatu = json['infoStatu'];
    accountStatu = json['accountStatu'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['nickName'] = this.nickName;
    data['sex'] = this.sex;
    data['avatarUrl'] = this.avatarUrl;
    data['infoStatu'] = this.infoStatu;
    data['accountStatu'] = this.accountStatu;
    return data;
  }
}
